package cn.backpackerxl.service;

import cn.backpackerxl.easyJDBC.util.PageBean;
import cn.backpackerxl.entity.Admin;

import java.util.List;

/**
 * @author: backpackerxl
 * @create: 2021/12/23
 * @filename: AdminRepository
 **/
public interface AdminService {
    int save(Admin admin);

    int update(Admin admin);

    int remove(Long id);

    Admin findById(Long id);

    List<Admin> findAll();

    Admin findByNameAndPasswd(String name, String passwd);

    List<Admin> findByNameOrPasswd(String name, String passwd);

    PageBean<Admin> pageEntityAll(int pageSize, int currentPage);

    List<Admin> searchByName(String key);

    List<Admin> findByName(String one);

    PageBean<Admin> searchByName(String key, int pageSize, int currentPage);
}
